using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace Gko.Utils
{
	internal sealed class LimitedSizeQueueDebugView<TValue>
	{
		// Fields
		private readonly LimitedSizeQueue<TValue> queue;

		// Methods
		/// <exception cref="ArgumentNullException">Argument is null.</exception>
		public LimitedSizeQueueDebugView(LimitedSizeQueue<TValue> queue)
		{
			if(queue.IsNull()) {
				throw new ArgumentNullException("queue");
			}
			this.queue = queue;
		}

		// Properties
		[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
		public TValue[] Items
		{
			get
			{
				return this.queue.ToArray();
			}
		}
	}
}